<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <script>


        //函数解构 -> function 方法名(形参列表中可以使用解构语法,解构对象或者数组和字符串等等.....)

        //1.计算三个数之和 [传入的是数组]
        function cul(x){
            return x[0] + x[1] +x[2];
        }

        function cul1([x,y,z]){
            return x+y+z;
        }

        //参数传递是对象能不能直接结构
        //登录函数 => {account: password: code:}
        function login({account,password,code}){
            console.log(account,password,code);
        }

        login({account:'root',password:123456,code:8888});

        console.log(cul1([998,889,112233]));

   </script>
</body>
</html>